package com.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.entity.StoreHouse;
import com.entity.User;
import com.mapper.StoreHouseMapper;
import com.mapper.UserMapper;
import com.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.io.Serializable;


@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements UserService {

    @Autowired
    UserMapper userMapper;

    @Autowired
    StoreHouseMapper storeHouseMapper;

//    @Override
//    public User getById(Serializable  id){
//        User t = userMapper.selectById(id);
//        QueryWrapper<StoreHouse> wrapper = new QueryWrapper<>();
//        wrapper.eq("id", t.getStoreHouseId());
//        StoreHouse storeHouse = storeHouseMapper.selectOne(wrapper);
//        t.setStoreHouse(storeHouse);
//        return t;
//    }
}
